<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Hospital_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-hospital_id" data-rule="required" data-source="hospital/index" class="form-control selectpage" name="row[hospital_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Department_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-department_id" data-rule="required" data-source="department/selectpage2" class="form-control selectpage" name="row[department_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Eequipment_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-equipment_id" data-rule="required" data-source="equipment/selectpage2" class="form-control selectpage" data-format-item="{name}({id})"  name="row[equipment_id]" type="text" value="">
        </div>
    </div>
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Product')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-product" data-rule="required" class="form-control" name="row[product]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Device')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-device" data-rule="required" class="form-control" name="row[device]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('System_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-system_number" class="form-control" name="row[system_number]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Software_version')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-software_version" class="form-control" name="row[software_version]" type="text">
        </div>
    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Describe')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-describe" class="form-control " rows="5" name="row[describe]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="textarea">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Contacts')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-contacts" data-rule="required" class="form-control" name="row[contacts]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mobile" data-rule="required" class="form-control" name="row[mobile]" type="text">
        </div>
    </div>
   <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Billing_data')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="billingDataList" item="vo"}
            <label for="row[billing_data]-{$key}"><input id="row[billing_data]-{$key}" name="row[billing_data]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" data-favisible="billing_data=1">
        <label class="control-label col-xs-12 col-sm-2">{:__('Billing_images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-billing_images" class="form-control" size="50" name="row[billing_images]" type="textarea">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-billing_images" class="btn btn-danger faupload" data-input-id="c-billing_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-billing_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-billing_images" class="btn btn-primary fachoose" data-input-id="c-billing_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-billing_images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-billing_images"></ul>
        </div>
    </div>
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Examinetime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-examinetime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[examinetime]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type_data')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="typeDataList" item="vo"}
            <label for="row[type_data]-{$key}"><input id="row[type_data]-{$key}" name="row[type_data]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Warranty_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-warranty_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[warranty_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Final_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-number" class="form-control" step="1" name="row[number]" value="1" type="number">
        </div>
    </div>
    -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Engineer_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-engineer_id" data-rule="required" data-params='{"type":"1"}' data-field="nickname" data-source="user/user/selectpage3" class="form-control selectpage" data-primary-key="id" name="row[engineer_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sale_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sale_id" data-rule="required" data-params='{"type":"2"}' data-field="nickname"  data-source="user/user/selectpage3" class="form-control selectpage" data-primary-key="id" name="row[sale_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Final_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-final_price" class="form-control" step="0.01" name="row[final_price]" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Maintain_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-maintain_num" class="form-control" step="1" value="1" min="0" name="row[maintain_num]" type="number">
        </div>
    </div>
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-number" data-rule="required" class="form-control " name="row[number]" type="text" value="1">
        </div>
    </div>-->
    <style>
        .fieldlist dd input:first-child {
            width: 160px;
        }
    </style>
    <!--<div class="form-group wangge" >
        <label class="control-label col-xs-12 col-sm-2">{:__('保养时间设置')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-name="row[servicetime]" data-template="testtpl">
                <dd>
                    <ins>时间</ins>
                </dd>
               &lt;!&ndash; <dd>
                    <input type="text" name="row[servicetime][0]" class="form-control  datetimepicker" value="<?php echo date('Y-m-d',strtotime('+1 day'));?>" placeholder='保养时间'data-date-format="YYYY-MM-DD" data-date-min-date="<?php echo date('Y-m-d',strtotime('+1 day'));?>">
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> &lt;!&ndash;<span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>&ndash;&gt;
                </dd>&ndash;&gt;
                <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
                </dd>
                <textarea name="row[servicetime]" class="form-control hide" cols="30" rows="5">[{"0":"<?php echo date('Y-m-d',strtotime('+1 day'));?>"}]</textarea>
            </dl>
            &lt;!&ndash;定义模板&ndash;&gt;
            <script type="text/html" id="testtpl">
                <dd class="form-inline">
                    <input type="text" name="row[servicetime][<%=index%>]" class="form-control  datetimepicker" value="<%=row['servicetime']%>" placeholder='保养时间'data-date-format="YYYY-MM-DD"  data-date-min-date="<?php echo date('Y-m-d',strtotime('+1 day'));?>">
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> &lt;!&ndash;<span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>&ndash;&gt;
                </dd>
            </script>
        </div>
    </div>-->
   <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('ServiceTime')}:</label>
        <div class="col-xs-12 col-sm-8 ServiceTime">

        </div>
    </div>-->
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
